package sctu.edu.java.year2016.team07.nieying.practice.Jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 * Created by Administrator on 2016/6/13 0013.
 */
public class Client {
    public static void main(String[] args){
        try {
            Document document= Jsoup.connect("https://jsoup.org/news/").get();
            Elements elements=document.select("ul");
            System.out.println(elements.get(0));
          //  Element content= document.getElementById("content");
         //   Elements links=content.getElementsByTag("a");
         //   for (Element link:links){
         //       String linkHref=link.attr("href");
          //      String linkText=link.text();
           // }
            System.out.println(document.body());
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
